<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>跳动的小球（加载效果）</title>
  <style>
    body {
      padding: 100px 0;
      height: 100%;
      /* Center box */
      display: grid;
      place-content: center;
    }
    section {
      display: flex;
      gap: 2px;
    }
    .box {
      width: 15px;
      height: 15px;
      background: slateblue;
      padding: 2px;
      display: grid;
      place-content: center;
      color: white;
      text-align: center;
      border-radius: 50%;
    }

    @keyframes bounce {
      from {
        transform: translateY(0px);
      }
      to {
        transform: translateY(
          var(--bounce-offset)
        );
      }
    }

    .box {
      animation:
        bounce alternate infinite
        cubic-bezier(.2, .65, .6, 1);
    }
    .box.one {
      --bounce-offset: -10px;
      animation-duration: 200ms;
    }
    .box.two {
      --bounce-offset: -15px;
      animation-duration: 300ms;
    }
    .box.three {
      --bounce-offset: -20px;
      animation-duration: 400ms;
    }
  </style>
</head>
<body>
  <div id="app">
    <section>
      <div class="box one"></div>
      <div class="box two"></div>
      <div class="box three"></div>
    </section>
  </div>
</body>
</html>